package jdbctest;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * Created by Administrator on 2017/9/11.
 */
public class ConnectionUtils {
    public  static Connection getConnection(){
        try{
            Class.forName("com.mysql.jdbc.Driver");
            Connection conn= DriverManager.getConnection("jdbc:mysql://localhost:3307/world","root","123456");
            return conn;
        }catch (Exception e){
            e.printStackTrace();
        }
        return null;
    }

}
